<div class="body-wrap" xmlns:ext="http://www.extjs.com"><div class="top-tools"><a class="inner-link" href="#Ext.util.Stateful-props"><img src="images/default/s.gif" class="item-icon icon-prop">Properties</a>&#13;<a class="inner-link" href="#Ext.util.Stateful-methods"><img src="images/default/s.gif" class="item-icon icon-method">Methods</a>&#13;<a class="inner-link" href="#Ext.util.Stateful-events"><img src="images/default/s.gif" class="item-icon icon-event">Events</a>&#13;<a class="inner-link" href="#Ext.util.Stateful-configs"><img src="images/default/s.gif" class="item-icon icon-config">Config Options</a>&#13;<a class="bookmark" href="../docs/?class=Ext.util.Stateful"><img src="images/default/s.gif" class="item-icon icon-fav">Direct Link</a>&#13;</div><div class="inheritance res-block"><pre class="res-block-inner"><a href="output/Ext.util.Observable.html" ext:member="" ext:cls="Ext.util.Observable">Observable</a>
  <img src="resources/elbow-end.gif">Stateful</pre></div><h1>Class <a href="source/Stateful.html#cls-Ext.util.Stateful">Ext.util.Stateful</a></h1><table cellspacing="0"><tr><td class="label">Package:</td><td class="hd-info">Ext.util</td></tr><tr><td class="label">Defined In:</td><td class="hd-info"><a href="source/Stateful.html#cls-Ext.util.Stateful">Stateful.js</a></td></tr><tr><td class="label">Class:</td><td class="hd-info"><a href="source/Stateful.html#cls-Ext.util.Stateful">Stateful</a></td></tr><tr><td class="label">Subclasses:</td><td class="hd-info"><a href="output/Ext.data.Model.html" ext:cls="Ext.data.Model">Model</a></td></tr><tr><td class="label">Extends:</td><td class="hd-info"><a href="output/Ext.util.Observable.html" ext:cls="Ext.util.Observable" ext:member="">Observable</a></td></tr></table><div class="description">Represents any object whose data can be saved by a <a href="output/Ext.data.Proxy.html" ext:cls="Ext.data.Proxy">Proxy</a>. Ext.Model
and Ext.View both inherit from this class as both can save state (Models save field state, 
Views save configuration)</div><div class="hr"></div><a id="Ext.util.Stateful-configs"></a><h2>Config Options</h2><table cellspacing="0" class="member-table"><tbody><tr><th colspan="2" class="sig-header">Config Options</th><th class="msource-header">Defined By</th></tr><tr class="config-row expandable inherited"><td class="micon"><a href="#expand" class="exi">&nbsp;</a></td><td class="sig"><a id="Ext.util.Observable-listeners"></a><b><a href="source/Observable.html#cfg-Ext.util.Observable-listeners">listeners</a></b> : Object<div class="mdesc"><div class="short">A config object containing one or more event handlers to be added to this
object during initialization.  This should ...</div><div class="long"><p>A config object containing one or more event handlers to be added to this
object during initialization.  This should be a valid listeners config object as specified in the
<a href="output/Ext.util.Observable.html#Ext.util.Observable-addListener" ext:member="addListener" ext:cls="Ext.util.Observable">addListener</a> example for attaching multiple handlers at once.</p>
<br><p><b><u>DOM events from ExtJs <a href="output/Ext.Component.html" ext:cls="Ext.Component">Components</a></u></b></p>
<br><p>While <i>some</i> ExtJs Component classes export selected DOM events (e.g. "click", "mouseover" etc), this
is usually only done when extra value can be added. For example the <a href="output/Ext.DataView.html" ext:cls="Ext.DataView">DataView</a>'s
<b><code><a href="output/Ext.DataView.html#Ext.DataView-click" ext:member="click" ext:cls="Ext.DataView">click</a></code></b> event passing the node clicked on. To access DOM
events directly from a a child element of a Component, we need to specify this explicitly:
<pre><code><b>new</b> Ext.Panel({
    width: 400,
    height: 200,
    dockedItems: [{
        xtype: <em>'toolbar'</em>
    }],
    listeners: {
        click: {
            element: <em>'el'</em>, <i>//bind to the underlying el property on the panel</i>
            fn: <b>function</b>(){ console.log(<em>'click el'</em>); }
        },
        dblclick: {
            element: <em>'body'</em>, <i>//bind to the underlying body property on the panel</i>
            fn: <b>function</b>(){ console.log(<em>'dblclick body'</em>); }
        }
    }
});</code></pre>
</p></div></div></td><td class="msource"><a href="output/Ext.util.Observable.html#listeners" ext:member="#listeners" ext:cls="Ext.util.Observable">Observable</a></td></tr><tr class="config-row expandable "><td class="micon"><a href="#expand" class="exi">&nbsp;</a></td><td class="sig"><a id="Ext.util.Stateful-persistanceProperty"></a><b><a href="source/Stateful.html#cfg-Ext.util.Stateful-persistanceProperty">persistanceProperty</a></b> : String<div class="mdesc"><div class="short">The property on this Persistable object that its data is saved to.
Defaults to 'data' (e.g. all persistable data resi...</div><div class="long">The property on this Persistable object that its data is saved to.
Defaults to 'data' (e.g. all persistable data resides in this.data.)</div></div></td><td class="msource">Stateful</td></tr></tbody></table><a id="Ext.util.Stateful-props"></a><h2>Public Properties</h2><table cellspacing="0" class="member-table"><tbody><tr><th colspan="2" class="sig-header">Property</th><th class="msource-header">Defined By</th></tr><tr class="property-row  "><td class="micon"><a href="#expand" class="exi">&nbsp;</a></td><td class="sig"><a id="Ext.util.Stateful-dirty"></a><b><a href="source/Stateful.html#prop-Ext.util.Stateful-dirty">dirty</a></b> : Boolean<div class="mdesc">Readonly flag - true if this Record has been modified.</div></td><td class="msource">Stateful</td></tr><tr class="property-row  "><td class="micon"><a href="#expand" class="exi">&nbsp;</a></td><td class="sig"><a id="Ext.util.Stateful-editing"></a><b><a href="source/Stateful.html#prop-Ext.util.Stateful-editing">editing</a></b> : Boolean<div class="mdesc">Internal flag used to track whether or not the model instance is currently being edited. Read-only</div></td><td class="msource">Stateful</td></tr><tr class="property-row  "><td class="micon"><a href="#expand" class="exi">&nbsp;</a></td><td class="sig"><a id="Ext.util.Stateful-modified"></a><b><a href="source/Stateful.html#prop-Ext.util.Stateful-modified">modified</a></b> : Object<div class="mdesc">Key: value pairs of all fields whose values have changed</div></td><td class="msource">Stateful</td></tr></tbody></table><a id="Ext.util.Stateful-methods"></a><h2>Public Methods</h2><table cellspacing="0" class="member-table"><tbody><tr><th colspan="2" class="sig-header">Method</th><th class="msource-header">Defined By</th></tr><tr class="method-row expandable inherited"><td class="micon"><a href="#expand" class="exi">&nbsp;</a></td><td class="sig"><a id="Ext.util.Observable-addEvents"></a><b><a href="source/Observable.html#method-Ext.util.Observable-addEvents">addEvents</a></b>(&nbsp;<code>Object|String&nbsp;o</code>,&nbsp;<code>string&nbsp;Optional.</code>&nbsp;)
    :
                                        void<div class="mdesc"><div class="short">Adds the specified events to the list of events which this Observable may fire.</div><div class="long">Adds the specified events to the list of events which this Observable may fire.<div class="mdetail-params"><strong>Parameters:</strong><ul><li><code>o</code> : Object|String<div class="sub-desc">Either an object with event names as properties with a value of <code>true</code>
or the first event name string if multiple event names are being passed as separate parameters.</div></li><li><code>Optional.</code> : string<div class="sub-desc">Event name if multiple event names are being passed as separate parameters.
Usage:<pre><code>this.addEvents(<em>'storeloaded'</em>, <em>'storecleared'</em>);</code></pre></div></li></ul><strong>Returns:</strong><ul><li>void</li></ul></div></div></div></td><td class="msource"><a href="output/Ext.util.Observable.html#addEvents" ext:member="#addEvents" ext:cls="Ext.util.Observable">Observable</a></td></tr><tr class="method-row expandable inherited"><td class="micon"><a href="#expand" class="exi">&nbsp;</a></td><td class="sig"><a id="Ext.util.Observable-addListener"></a><b><a href="source/Observable.html#method-Ext.util.Observable-addListener">addListener</a></b>(&nbsp;<code>String&nbsp;eventName</code>,&nbsp;<code>Function&nbsp;handler</code>,&nbsp;<span title="Optional" class="optional">[<code>Object&nbsp;scope</code>]</span>,&nbsp;<span title="Optional" class="optional">[<code>Object&nbsp;options</code>]</span>&nbsp;)
    :
                                        void<div class="mdesc"><div class="short">Appends an event handler to this object.</div><div class="long">Appends an event handler to this object.<div class="mdetail-params"><strong>Parameters:</strong><ul><li><code>eventName</code> : String<div class="sub-desc">The name of the event to listen for.</div></li><li><code>handler</code> : Function<div class="sub-desc">The method the event invokes.</div></li><li><code>scope</code> : Object<div class="sub-desc">(optional) The scope (<code><b>this</b></code> reference) in which the handler function is executed.
<b>If omitted, defaults to the object which fired the event.</b></div></li><li><code>options</code> : Object<div class="sub-desc">(optional) An object containing handler configuration.
properties. This may contain any of the following properties:<ul>
<li><b>scope</b> : Object<div class="sub-desc">The scope (<code><b>this</b></code> reference) in which the handler function is executed.
<b>If omitted, defaults to the object which fired the event.</b></div></li>
<li><b>delay</b> : Number<div class="sub-desc">The number of milliseconds to delay the invocation of the handler after the event fires.</div></li>
<li><b>single</b> : Boolean<div class="sub-desc">True to add a handler to handle just the next firing of the event, and then remove itself.</div></li>
<li><b>buffer</b> : Number<div class="sub-desc">Causes the handler to be scheduled to run in an <a href="output/Ext.util.DelayedTask.html" ext:cls="Ext.util.DelayedTask">Ext.util.DelayedTask</a> delayed
by the specified number of milliseconds. If the event fires again within that time, the original
handler is <em>not</em> invoked, but the new handler is scheduled in its place.</div></li>
<li><b>target</b> : Observable<div class="sub-desc">Only call the handler if the event was fired on the target Observable, <i>not</i>
if the event was bubbled up from a child Observable.</div></li>
<li><b>element</b> : String<div class="sub-desc">The element reference on the component to bind the event to. This is used to bind DOM events to underlying elements on <a href="output/Ext.Component.html" ext:cls="Ext.Component">Components</a>. - This option is only valid for listeners bound to <a href="output/Ext.Component.html" ext:cls="Ext.Component">Components</a></div></li>
</ul><br>
<p>
<b>Combining Options</b><br>
Using the options argument, it is possible to combine different types of listeners:<br>
<br>
A delayed, one-time listener.
<pre><code>myPanel.on(<em>'hide'</em>, this.onClick, this, {
single: true,
delay: 100
});</code></pre>
<p>
<b>Attaching multiple handlers in 1 call</b><br>
The method also allows for a single argument to be passed which is a config object containing properties
which specify multiple handlers.
<p></div></li></ul><strong>Returns:</strong><ul><li>void</li></ul></div></div></div></td><td class="msource"><a href="output/Ext.util.Observable.html#addListener" ext:member="#addListener" ext:cls="Ext.util.Observable">Observable</a></td></tr><tr class="method-row expandable inherited"><td class="micon"><a href="#expand" class="exi">&nbsp;</a></td><td class="sig"><a id="Ext.util.Observable-addManagedListener"></a><b><a href="source/Observable.html#method-Ext.util.Observable-addManagedListener">addManagedListener</a></b>(&nbsp;<code>Observable|Element&nbsp;item</code>,&nbsp;<code>Object|String&nbsp;ename</code>,&nbsp;<code>Function&nbsp;fn</code>,&nbsp;<code>Object&nbsp;scope</code>,&nbsp;<code>Object&nbsp;opt</code>&nbsp;)
    :
                                        void<div class="mdesc"><div class="short">Adds listeners to any Observable object (or Element) which are automatically removed when this Component
is destroyed...</div><div class="long"><p>Adds listeners to any Observable object (or Element) which are automatically removed when this Component
is destroyed.<div class="mdetail-params"><strong>Parameters:</strong><ul><li><code>item</code> : Observable|Element<div class="sub-desc">The item to which to add a listener/listeners.</div></li><li><code>ename</code> : Object|String<div class="sub-desc">The event name, or an object containing event name properties.</div></li><li><code>fn</code> : Function<div class="sub-desc">Optional. If the <code>ename</code> parameter was an event name, this
is the handler function.</div></li><li><code>scope</code> : Object<div class="sub-desc">Optional. If the <code>ename</code> parameter was an event name, this
is the scope (<code>this</code> reference) in which the handler function is executed.</div></li><li><code>opt</code> : Object<div class="sub-desc">Optional. If the <code>ename</code> parameter was an event name, this
is the <a href="output/Ext.util.Observable.html#Ext.util.Observable-addListener" ext:member="addListener" ext:cls="Ext.util.Observable">addListener</a> options.</div></li></ul><strong>Returns:</strong><ul><li>void</li></ul></div></div></div></td><td class="msource"><a href="output/Ext.util.Observable.html#addManagedListener" ext:member="#addManagedListener" ext:cls="Ext.util.Observable">Observable</a></td></tr><tr class="method-row expandable inherited"><td class="micon"><a href="#expand" class="exi">&nbsp;</a></td><td class="sig"><a id="Ext.util.Observable-clearListeners"></a><b><a href="source/Observable.html#method-Ext.util.Observable-clearListeners">clearListeners</a></b>()
    :
                                        void<div class="mdesc"><div class="short">Removes all listeners for this object including the managed listeners</div><div class="long">Removes all listeners for this object including the managed listeners<div class="mdetail-params"><strong>Parameters:</strong><ul><li>None.</li></ul><strong>Returns:</strong><ul><li>void</li></ul></div></div></div></td><td class="msource"><a href="output/Ext.util.Observable.html#clearListeners" ext:member="#clearListeners" ext:cls="Ext.util.Observable">Observable</a></td></tr><tr class="method-row expandable inherited"><td class="micon"><a href="#expand" class="exi">&nbsp;</a></td><td class="sig"><a id="Ext.util.Observable-clearManagedListeners"></a><b><a href="source/Observable.html#method-Ext.util.Observable-clearManagedListeners">clearManagedListeners</a></b>()
    :
                                        void<div class="mdesc"><div class="short">Removes all managed listeners for this object.</div><div class="long">Removes all managed listeners for this object.<div class="mdetail-params"><strong>Parameters:</strong><ul><li>None.</li></ul><strong>Returns:</strong><ul><li>void</li></ul></div></div></div></td><td class="msource"><a href="output/Ext.util.Observable.html#clearManagedListeners" ext:member="#clearManagedListeners" ext:cls="Ext.util.Observable">Observable</a></td></tr><tr class="method-row expandable "><td class="micon"><a href="#expand" class="exi">&nbsp;</a></td><td class="sig"><a id="Ext.util.Stateful-commit"></a><b><a href="source/Stateful.html#method-Ext.util.Stateful-commit">commit</a></b>(&nbsp;<span title="Optional" class="optional">[<code>Boolean&nbsp;silent</code>]</span>&nbsp;)
    :
                                        void<div class="mdesc"><div class="short">Usually called by the Ext.data.Store which owns the model instance.
Commits all changes made to the instance since ei...</div><div class="long">Usually called by the <a href="output/Ext.data.Store.html" ext:cls="Ext.data.Store">Ext.data.Store</a> which owns the model instance.
Commits all changes made to the instance since either creation or the last commit operation.
<p>Developers should subscribe to the <a href="output/Ext.data.Store.html#Ext.data.Store-update" ext:member="update" ext:cls="Ext.data.Store">Ext.data.Store.update</a> event
to have their code notified of commit operations.</p><div class="mdetail-params"><strong>Parameters:</strong><ul><li><code>silent</code> : Boolean<div class="sub-desc">(optional) True to skip notification of the owning
store of the change (defaults to false)</div></li></ul><strong>Returns:</strong><ul><li>void</li></ul></div></div></div></td><td class="msource">Stateful</td></tr><tr class="method-row expandable "><td class="micon"><a href="#expand" class="exi">&nbsp;</a></td><td class="sig"><a id="Ext.util.Stateful-copy"></a><b><a href="source/Stateful.html#method-Ext.util.Stateful-copy">copy</a></b>(&nbsp;<span title="Optional" class="optional">[<code>String&nbsp;id</code>]</span>&nbsp;)
    :
                                        Record<div class="mdesc"><div class="short">Creates a copy (clone) of this Model instance.</div><div class="long">Creates a copy (clone) of this Model instance.<div class="mdetail-params"><strong>Parameters:</strong><ul><li><code>id</code> : String<div class="sub-desc">(optional) A new id, defaults to the id
of the instance being copied. See <code><a href="output/Ext.util.Stateful.html#Ext.util.Stateful-id" ext:member="id" ext:cls="Ext.util.Stateful">id</a></code>. 
To generate a phantom instance with a new id use:<pre><code><b>var</b> rec = record.copy(); <i>// clone the record</i>
Ext.data.Model.id(rec); <i>// automatically generate a unique sequential id</i></code></pre></div></li></ul><strong>Returns:</strong><ul><li><code>Record</code><div class="sub-desc"></div></li></ul></div></div></div></td><td class="msource">Stateful</td></tr><tr class="method-row expandable inherited"><td class="micon"><a href="#expand" class="exi">&nbsp;</a></td><td class="sig"><a id="Ext.util.Observable-enableBubble"></a><b><a href="source/Observable.html#method-Ext.util.Observable-enableBubble">enableBubble</a></b>(&nbsp;<code>String/Array&nbsp;events</code>&nbsp;)
    :
                                        void<div class="mdesc"><div class="short">Enables events fired by this Observable to bubble up an owner hierarchy by calling
this.getBubbleTarget() if present....</div><div class="long"><p>Enables events fired by this Observable to bubble up an owner hierarchy by calling
<code>this.getBubbleTarget()</code> if present. There is no implementation in the Observable base class.</p>
<p>This is commonly used by Ext.Components to bubble events to owner Containers. See <a href="output/Ext.Component.getBubbleTarget.html" ext:cls="Ext.Component.getBubbleTarget">Ext.Component.getBubbleTarget</a>. The default
implementation in Ext.Component returns the Component's immediate owner. But if a known target is required, this can be overridden to
access the required target more quickly.</p>
<p>Example:</p><pre><code>Ext.override(Ext.form.Field, {
<i>//  Add functionality to Field&#39;s initComponent to enable the change event to bubble</i>
initComponent : Ext.createSequence(Ext.form.Field.prototype.initComponent, <b>function</b>() {
    this.enableBubble(<em>'change'</em>);
}),

<i>//  We know that we want Field&#39;s events to bubble directly to the FormPanel.</i>
getBubbleTarget : <b>function</b>() {
    <b>if</b> (!this.formPanel) {
        this.formPanel = this.findParentByType(<em>'form'</em>);
    }
    <b>return</b> this.formPanel;
}
});

<b>var</b> myForm = <b>new</b> Ext.formPanel({
title: <em>'User Details'</em>,
items: [{
    ...
}],
listeners: {
    change: <b>function</b>() {
        <i>// Title goes red <b>if</b> form has been modified.</i>
        myForm.header.setStyle(<em>'color'</em>, <em>'red'</em>);
    }
}
});</code></pre><div class="mdetail-params"><strong>Parameters:</strong><ul><li><code>events</code> : String/Array<div class="sub-desc">The event name to bubble, or an Array of event names.</div></li></ul><strong>Returns:</strong><ul><li>void</li></ul></div></div></div></td><td class="msource"><a href="output/Ext.util.Observable.html#enableBubble" ext:member="#enableBubble" ext:cls="Ext.util.Observable">Observable</a></td></tr><tr class="method-row expandable inherited"><td class="micon"><a href="#expand" class="exi">&nbsp;</a></td><td class="sig"><a id="Ext.util.Observable-fireEvent"></a><b><a href="source/Observable.html#method-Ext.util.Observable-fireEvent">fireEvent</a></b>(&nbsp;<code>String&nbsp;eventName</code>,&nbsp;<code>Object...&nbsp;args</code>&nbsp;)
    :
                                        Boolean<div class="mdesc"><div class="short">Fires the specified event with the passed parameters (minus the event name).
An event may be set to bubble up an Obse...</div><div class="long"><p>Fires the specified event with the passed parameters (minus the event name).</p>
<p>An event may be set to bubble up an Observable parent hierarchy (See <a href="output/Ext.Component.html#Ext.Component-getBubbleTarget" ext:member="getBubbleTarget" ext:cls="Ext.Component">Ext.Component.getBubbleTarget</a>)
by calling <a href="output/Ext.util.Observable.html#Ext.util.Observable-enableBubble" ext:member="enableBubble" ext:cls="Ext.util.Observable">enableBubble</a>.</p><div class="mdetail-params"><strong>Parameters:</strong><ul><li><code>eventName</code> : String<div class="sub-desc">The name of the event to fire.</div></li><li><code>args</code> : Object...<div class="sub-desc">Variable number of parameters are passed to handlers.</div></li></ul><strong>Returns:</strong><ul><li><code>Boolean</code><div class="sub-desc">returns false if any of the handlers return false otherwise it returns true.</div></li></ul></div></div></div></td><td class="msource"><a href="output/Ext.util.Observable.html#fireEvent" ext:member="#fireEvent" ext:cls="Ext.util.Observable">Observable</a></td></tr><tr class="method-row expandable "><td class="micon"><a href="#expand" class="exi">&nbsp;</a></td><td class="sig"><a id="Ext.util.Stateful-get"></a><b><a href="source/Stateful.html#method-Ext.util.Stateful-get">get</a></b>(&nbsp;<code>String&nbsp;fieldName</code>&nbsp;)
    :
                                        Mixed<div class="mdesc"><div class="short">Returns the value of the given field</div><div class="long">Returns the value of the given field<div class="mdetail-params"><strong>Parameters:</strong><ul><li><code>fieldName</code> : String<div class="sub-desc">The field to fetch the value for</div></li></ul><strong>Returns:</strong><ul><li><code>Mixed</code><div class="sub-desc">The value</div></li></ul></div></div></div></td><td class="msource">Stateful</td></tr><tr class="method-row expandable "><td class="micon"><a href="#expand" class="exi">&nbsp;</a></td><td class="sig"><a id="Ext.util.Stateful-getChanges"></a><b><a href="source/Stateful.html#method-Ext.util.Stateful-getChanges">getChanges</a></b>()
    :
                                        Object<div class="mdesc"><div class="short">Gets a hash of only the fields that have been modified since this Model was created or commited.</div><div class="long">Gets a hash of only the fields that have been modified since this Model was created or commited.<div class="mdetail-params"><strong>Parameters:</strong><ul><li>None.</li></ul><strong>Returns:</strong><ul><li><code>Object</code><div class="sub-desc"></div></li></ul></div></div></div></td><td class="msource">Stateful</td></tr><tr class="method-row expandable inherited"><td class="micon"><a href="#expand" class="exi">&nbsp;</a></td><td class="sig"><a id="Ext.util.Observable-hasListener"></a><b><a href="source/Observable.html#method-Ext.util.Observable-hasListener">hasListener</a></b>(&nbsp;<code>String&nbsp;eventName</code>&nbsp;)
    :
                                        Boolean<div class="mdesc"><div class="short">Checks to see if this object has any listeners for a specified event</div><div class="long">Checks to see if this object has any listeners for a specified event<div class="mdetail-params"><strong>Parameters:</strong><ul><li><code>eventName</code> : String<div class="sub-desc">The name of the event to check for</div></li></ul><strong>Returns:</strong><ul><li><code>Boolean</code><div class="sub-desc">True if the event is being listened for, else false</div></li></ul></div></div></div></td><td class="msource"><a href="output/Ext.util.Observable.html#hasListener" ext:member="#hasListener" ext:cls="Ext.util.Observable">Observable</a></td></tr><tr class="method-row expandable "><td class="micon"><a href="#expand" class="exi">&nbsp;</a></td><td class="sig"><a id="Ext.util.Stateful-isModified"></a><b><a href="source/Stateful.html#method-Ext.util.Stateful-isModified">isModified</a></b>(&nbsp;<code>String&nbsp;fieldName</code>&nbsp;)
    :
                                        Boolean<div class="mdesc"><div class="short">Returns true if the passed field name has been modified
since the load or last commit.</div><div class="long">Returns <tt>true</tt> if the passed field name has been <code><a href="output/Ext.util.Stateful.html#Ext.util.Stateful-modified" ext:member="modified" ext:cls="Ext.util.Stateful">modified</a></code>
since the load or last commit.<div class="mdetail-params"><strong>Parameters:</strong><ul><li><code>fieldName</code> : String<div class="sub-desc"><a href="output/Ext.data.Field.html#Ext.data.Field-name" ext:member="name" ext:cls="Ext.data.Field">Ext.data.Field.name</a></div></li></ul><strong>Returns:</strong><ul><li><code>Boolean</code><div class="sub-desc"></div></li></ul></div></div></div></td><td class="msource">Stateful</td></tr><tr class="method-row expandable inherited"><td class="micon"><a href="#expand" class="exi">&nbsp;</a></td><td class="sig"><a id="Ext.util.Observable-on"></a><b><a href="source/Observable.html#method-Ext.util.Observable-on">on</a></b>(&nbsp;<code>String&nbsp;eventName</code>,&nbsp;<code>Function&nbsp;handler</code>,&nbsp;<span title="Optional" class="optional">[<code>Object&nbsp;scope</code>]</span>,&nbsp;<span title="Optional" class="optional">[<code>Object&nbsp;options</code>]</span>&nbsp;)
    :
                                        void<div class="mdesc"><div class="short">Appends an event handler to this object (shorthand for addListener.)</div><div class="long">Appends an event handler to this object (shorthand for <a href="output/Ext.util.Observable.html#Ext.util.Observable-addListener" ext:member="addListener" ext:cls="Ext.util.Observable">addListener</a>.)<div class="mdetail-params"><strong>Parameters:</strong><ul><li><code>eventName</code> : String<div class="sub-desc">The type of event to listen for</div></li><li><code>handler</code> : Function<div class="sub-desc">The method the event invokes</div></li><li><code>scope</code> : Object<div class="sub-desc">(optional) The scope (<code><b>this</b></code> reference) in which the handler function is executed.
<b>If omitted, defaults to the object which fired the event.</b></div></li><li><code>options</code> : Object<div class="sub-desc">(optional) An object containing handler configuration.</div></li></ul><strong>Returns:</strong><ul><li>void</li></ul></div></div></div></td><td class="msource"><a href="output/Ext.util.Observable.html#on" ext:member="#on" ext:cls="Ext.util.Observable">Observable</a></td></tr><tr class="method-row expandable "><td class="micon"><a href="#expand" class="exi">&nbsp;</a></td><td class="sig"><a id="Ext.util.Stateful-reject"></a><b><a href="source/Stateful.html#method-Ext.util.Stateful-reject">reject</a></b>(&nbsp;<span title="Optional" class="optional">[<code>Boolean&nbsp;silent</code>]</span>&nbsp;)
    :
                                        void<div class="mdesc"><div class="short">Usually called by the Ext.data.Store to which this model instance has been joined.
Rejects all changes made to the mo...</div><div class="long">Usually called by the <a href="output/Ext.data.Store.html" ext:cls="Ext.data.Store">Ext.data.Store</a> to which this model instance has been <a href="output/Ext.util.Stateful.html#Ext.util.Stateful-join" ext:member="join" ext:cls="Ext.util.Stateful">joined</a>.
Rejects all changes made to the model instance since either creation, or the last commit operation.
Modified fields are reverted to their original values.
<p>Developers should subscribe to the <a href="output/Ext.data.Store.html#Ext.data.Store-update" ext:member="update" ext:cls="Ext.data.Store">Ext.data.Store.update</a> event
to have their code notified of reject operations.</p><div class="mdetail-params"><strong>Parameters:</strong><ul><li><code>silent</code> : Boolean<div class="sub-desc">(optional) True to skip notification of the owning
store of the change (defaults to false)</div></li></ul><strong>Returns:</strong><ul><li>void</li></ul></div></div></div></td><td class="msource">Stateful</td></tr><tr class="method-row expandable inherited"><td class="micon"><a href="#expand" class="exi">&nbsp;</a></td><td class="sig"><a id="Ext.util.Observable-relayEvents"></a><b><a href="source/Observable.html#method-Ext.util.Observable-relayEvents">relayEvents</a></b>(&nbsp;<code>Object&nbsp;o</code>,&nbsp;<code>Array&nbsp;events</code>&nbsp;)
    :
                                        void<div class="mdesc"><div class="short">Relays selected events from the specified Observable as if the events were fired by this.</div><div class="long">Relays selected events from the specified Observable as if the events were fired by <tt><b>this</b></tt>.<div class="mdetail-params"><strong>Parameters:</strong><ul><li><code>o</code> : Object<div class="sub-desc">The Observable whose events this object is to relay.</div></li><li><code>events</code> : Array<div class="sub-desc">Array of event names to relay.</div></li></ul><strong>Returns:</strong><ul><li>void</li></ul></div></div></div></td><td class="msource"><a href="output/Ext.util.Observable.html#relayEvents" ext:member="#relayEvents" ext:cls="Ext.util.Observable">Observable</a></td></tr><tr class="method-row expandable inherited"><td class="micon"><a href="#expand" class="exi">&nbsp;</a></td><td class="sig"><a id="Ext.util.Observable-removeListener"></a><b><a href="source/Observable.html#method-Ext.util.Observable-removeListener">removeListener</a></b>(&nbsp;<code>String&nbsp;eventName</code>,&nbsp;<code>Function&nbsp;handler</code>,&nbsp;<span title="Optional" class="optional">[<code>Object&nbsp;scope</code>]</span>&nbsp;)
    :
                                        void<div class="mdesc"><div class="short">Removes an event handler.</div><div class="long">Removes an event handler.<div class="mdetail-params"><strong>Parameters:</strong><ul><li><code>eventName</code> : String<div class="sub-desc">The type of event the handler was associated with.</div></li><li><code>handler</code> : Function<div class="sub-desc">The handler to remove. <b>This must be a reference to the function passed into the <a href="output/Ext.util.Observable.html#Ext.util.Observable-addListener" ext:member="addListener" ext:cls="Ext.util.Observable">addListener</a> call.</b></div></li><li><code>scope</code> : Object<div class="sub-desc">(optional) The scope originally specified for the handler.</div></li></ul><strong>Returns:</strong><ul><li>void</li></ul></div></div></div></td><td class="msource"><a href="output/Ext.util.Observable.html#removeListener" ext:member="#removeListener" ext:cls="Ext.util.Observable">Observable</a></td></tr><tr class="method-row expandable inherited"><td class="micon"><a href="#expand" class="exi">&nbsp;</a></td><td class="sig"><a id="Ext.util.Observable-removeManagedListener"></a><b><a href="source/Observable.html#method-Ext.util.Observable-removeManagedListener">removeManagedListener</a></b>(&nbsp;<code>Observable|Element&nbsp;item</code>,&nbsp;<code>Object|String&nbsp;ename</code>,&nbsp;<code>Function&nbsp;fn</code>,&nbsp;<code>Object&nbsp;scope</code>&nbsp;)
    :
                                        void<div class="mdesc"><div class="short">Removes listeners that were added by the mon method.</div><div class="long">Removes listeners that were added by the <a href="output/Ext.util.Observable.html#Ext.util.Observable-mon" ext:member="mon" ext:cls="Ext.util.Observable">mon</a> method.<div class="mdetail-params"><strong>Parameters:</strong><ul><li><code>item</code> : Observable|Element<div class="sub-desc">The item from which to remove a listener/listeners.</div></li><li><code>ename</code> : Object|String<div class="sub-desc">The event name, or an object containing event name properties.</div></li><li><code>fn</code> : Function<div class="sub-desc">Optional. If the <code>ename</code> parameter was an event name, this
is the handler function.</div></li><li><code>scope</code> : Object<div class="sub-desc">Optional. If the <code>ename</code> parameter was an event name, this
is the scope (<code>this</code> reference) in which the handler function is executed.</div></li></ul><strong>Returns:</strong><ul><li>void</li></ul></div></div></div></td><td class="msource"><a href="output/Ext.util.Observable.html#removeManagedListener" ext:member="#removeManagedListener" ext:cls="Ext.util.Observable">Observable</a></td></tr><tr class="method-row expandable inherited"><td class="micon"><a href="#expand" class="exi">&nbsp;</a></td><td class="sig"><a id="Ext.util.Observable-resumeEvents"></a><b><a href="source/Observable.html#method-Ext.util.Observable-resumeEvents">resumeEvents</a></b>()
    :
                                        void<div class="mdesc"><div class="short">Resume firing events. (see suspendEvents)
If events were suspended using the queueSuspended parameter, then all
event...</div><div class="long">Resume firing events. (see <a href="output/Ext.util.Observable.html#Ext.util.Observable-suspendEvents" ext:member="suspendEvents" ext:cls="Ext.util.Observable">suspendEvents</a>)
If events were suspended using the <tt><b>queueSuspended</b></tt> parameter, then all
events fired during event suspension will be sent to any listeners now.<div class="mdetail-params"><strong>Parameters:</strong><ul><li>None.</li></ul><strong>Returns:</strong><ul><li>void</li></ul></div></div></div></td><td class="msource"><a href="output/Ext.util.Observable.html#resumeEvents" ext:member="#resumeEvents" ext:cls="Ext.util.Observable">Observable</a></td></tr><tr class="method-row expandable "><td class="micon"><a href="#expand" class="exi">&nbsp;</a></td><td class="sig"><a id="Ext.util.Stateful-set"></a><b><a href="source/Stateful.html#method-Ext.util.Stateful-set">set</a></b>(&nbsp;<code>String|Object&nbsp;fieldName</code>,&nbsp;<code>Mixed&nbsp;value</code>&nbsp;)
    :
                                        void<div class="mdesc"><div class="short">Sets the given field to the given value, marks the instance as dirty</div><div class="long">Sets the given field to the given value, marks the instance as dirty<div class="mdetail-params"><strong>Parameters:</strong><ul><li><code>fieldName</code> : String|Object<div class="sub-desc">The field to set, or an object containing key/value pairs</div></li><li><code>value</code> : Mixed<div class="sub-desc">The value to set</div></li></ul><strong>Returns:</strong><ul><li>void</li></ul></div></div></div></td><td class="msource">Stateful</td></tr><tr class="method-row expandable "><td class="micon"><a href="#expand" class="exi">&nbsp;</a></td><td class="sig"><a id="Ext.util.Stateful-setDirty"></a><b><a href="source/Stateful.html#method-Ext.util.Stateful-setDirty">setDirty</a></b>()
    :
                                        void<div class="mdesc"><div class="short">Marks this Record as dirty.  This method
is used interally when adding phantom records to a
writer enabled store.
Mar...</div><div class="long"><p>Marks this <b>Record</b> as <code><a href="output/Ext.util.Stateful.html#Ext.util.Stateful-dirty" ext:member="dirty" ext:cls="Ext.util.Stateful">dirty</a></code>.  This method
is used interally when adding <code><a href="output/Ext.util.Stateful.html#Ext.util.Stateful-phantom" ext:member="phantom" ext:cls="Ext.util.Stateful">phantom</a></code> records to a
<a href="output/Ext.data.Store.html#Ext.data.Store-writer" ext:member="writer" ext:cls="Ext.data.Store">writer enabled store</a>.</p>
<br><p>Marking a record <code><a href="output/Ext.util.Stateful.html#Ext.util.Stateful-dirty" ext:member="dirty" ext:cls="Ext.util.Stateful">dirty</a></code> causes the phantom to
be returned by <a href="output/Ext.data.Store.html#Ext.data.Store-getModifiedRecords" ext:member="getModifiedRecords" ext:cls="Ext.data.Store">Ext.data.Store.getModifiedRecords</a> where it will
have a create action composed for it during <a href="output/Ext.data.Store.html#Ext.data.Store-save" ext:member="save" ext:cls="Ext.data.Store">store save</a>
operations.</p><div class="mdetail-params"><strong>Parameters:</strong><ul><li>None.</li></ul><strong>Returns:</strong><ul><li>void</li></ul></div></div></div></td><td class="msource">Stateful</td></tr><tr class="method-row expandable inherited"><td class="micon"><a href="#expand" class="exi">&nbsp;</a></td><td class="sig"><a id="Ext.util.Observable-suspendEvents"></a><b><a href="source/Observable.html#method-Ext.util.Observable-suspendEvents">suspendEvents</a></b>(&nbsp;<code>Boolean&nbsp;queueSuspended</code>&nbsp;)
    :
                                        void<div class="mdesc"><div class="short">Suspend the firing of all events. (see resumeEvents)</div><div class="long">Suspend the firing of all events. (see <a href="output/Ext.util.Observable.html#Ext.util.Observable-resumeEvents" ext:member="resumeEvents" ext:cls="Ext.util.Observable">resumeEvents</a>)<div class="mdetail-params"><strong>Parameters:</strong><ul><li><code>queueSuspended</code> : Boolean<div class="sub-desc">Pass as true to queue up suspended events to be fired
after the <a href="output/Ext.util.Observable.html#Ext.util.Observable-resumeEvents" ext:member="resumeEvents" ext:cls="Ext.util.Observable">resumeEvents</a> call instead of discarding all suspended events;</div></li></ul><strong>Returns:</strong><ul><li>void</li></ul></div></div></div></td><td class="msource"><a href="output/Ext.util.Observable.html#suspendEvents" ext:member="#suspendEvents" ext:cls="Ext.util.Observable">Observable</a></td></tr><tr class="method-row expandable inherited"><td class="micon"><a href="#expand" class="exi">&nbsp;</a></td><td class="sig"><a id="Ext.util.Observable-un"></a><b><a href="source/Observable.html#method-Ext.util.Observable-un">un</a></b>(&nbsp;<code>String&nbsp;eventName</code>,&nbsp;<code>Function&nbsp;handler</code>,&nbsp;<span title="Optional" class="optional">[<code>Object&nbsp;scope</code>]</span>&nbsp;)
    :
                                        void<div class="mdesc"><div class="short">Removes an event handler (shorthand for removeListener.)</div><div class="long">Removes an event handler (shorthand for <a href="output/Ext.util.Observable.html#Ext.util.Observable-removeListener" ext:member="removeListener" ext:cls="Ext.util.Observable">removeListener</a>.)<div class="mdetail-params"><strong>Parameters:</strong><ul><li><code>eventName</code> : String<div class="sub-desc">The type of event the handler was associated with.</div></li><li><code>handler</code> : Function<div class="sub-desc">The handler to remove. <b>This must be a reference to the function passed into the <a href="output/Ext.util.Observable.html#Ext.util.Observable-addListener" ext:member="addListener" ext:cls="Ext.util.Observable">addListener</a> call.</b></div></li><li><code>scope</code> : Object<div class="sub-desc">(optional) The scope originally specified for the handler.</div></li></ul><strong>Returns:</strong><ul><li>void</li></ul></div></div></div></td><td class="msource"><a href="output/Ext.util.Observable.html#un" ext:member="#un" ext:cls="Ext.util.Observable">Observable</a></td></tr></tbody></table><a id="Ext.util.Stateful-events"></a><h2>Public Events</h2><div class="no-members">This class has no public events.</div></div>